package com.jieshen.utils;

import org.junit.Test;

public class convert {
    public static String toBrackets(String str) {
        str = str.replace(" ","");
        str = str.replace("\"","");
        str = str.replace("\n","");
        String s = str.replace("[", "{");
        return s.replace("]", "}");
    }

    @Test
    public void testToBrackets() {


        String str = "[\n" +
                "  [1,   4,  7, 11, 15],\n" +
                "  [2,   5,  8, 12, 19],\n" +
                "  [3,   6,  9, 16, 22],\n" +
                "  [10, 13, 14, 17, 24],\n" +
                "  [18, 21, 23, 26, 30]\n" +
                "]";


        System.out.println(toBrackets(str));
    }
}


